package com.example.smartall.diaglog;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.example.smartall.R;

/**
 * 工具类
 * 用于异步加载的时弹出 关闭界面交互
 */
public class LoadedDialog extends Dialog {
    public LoadedDialog(@NonNull Context context) {
        super(context);
    }

    public LoadedDialog(@NonNull Context context, int themeResId) {
        super(context, themeResId);
    }

    protected LoadedDialog(@NonNull Context context, boolean cancelable, @Nullable OnCancelListener cancelListener) {
        super(context, cancelable, cancelListener);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.loaded_dialog);
        //关闭界面交互
        this.setCancelable(false);
    }
}
